package com.lp;

import com.lp.model.Person;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Main {
    public static void main(String[] args) {
        ApplicationContext ioc =
                new ClassPathXmlApplicationContext("spring-config.xml");
        Person bean1 = (Person) ioc.getBean("person");
        Person bean2 = (Person) ioc.getBean("person");
        System.out.println(bean2 == bean1);
        System.out.println(bean1);
    }
}